﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="ListMostBought.aspx.cs" Inherits="Pages_ListMostBought" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" Runat="Server">
<div id="listproduct">
    <div id="content-product">
        <div class="header-product">
            <div class="header-product-left">
            </div>
            <div class="header-product-center">
                Sản phẩm bán chạy</div>
            <div class="header-product-right">
            </div>
        </div>
        <asp:DataList ID="dlListProduct" runat="server" RepeatColumns="4" RepeatDirection="Horizontal"
            CssClass="datalistproduct" OnItemCommand="DataList1_ItemCommand">
            <ItemTemplate>
                <table>
                    <tr>
                        <td align="center" valign="bottom" class="td_img">
                            <a href="<%#Eval("Id","/Pages/ProductDetail.aspx?Catogory_Id ="+Eval("Category_Id")+"&Id={0}") %>">
                                <asp:Image ID="img1" ToolTip='<%#Eval("Name") %>' ImageUrl='<%#Eval("Image") %>'
                                    Width="150px" Height="120px" runat="server" /></a>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:HyperLink ID="hyp1" ToolTip='<%#Eval("Name") %>' NavigateUrl='<%#Eval("Id","/Pages/ProductDetail.aspx?Catogory_Id ="+Eval("Category_Id")+"&Id={0}") %>'
                                runat="server" Text='<%#CatChu(Eval("Name").ToString()) %>' ForeColor="#088aca"
                                Font-Size="13px" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Giá bán:&nbsp;<asp:Label ID="Label1" Font-Size="13px" ForeColor="Red" Text='<%#Format_Price(Eval("Price").ToString())%>'
                                runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Số lần mua:&nbsp;<asp:Label Font-Size="13px" ID="Label3" ForeColor="red" Text='<%#Eval("NumBought").ToString()%>'
                                runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:ImageButton ID="btnChon" CommandArgument='<%#Eval("Id").ToString() %>' CommandName="Choose"
                                ImageUrl='/Styles/Images/btnChon.png' runat="server" />
                            <asp:ImageButton ID="btnChiTiet" CommandArgument='<%#Eval("Id").ToString() %>' CommandName="Detail"
                                ImageUrl='/Styles/Images/btnChiTiet.png' runat="server" />
                        </td>
                    </tr>
                </table>
            </ItemTemplate>
        </asp:DataList>        
    </div>
</div> 
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="footer" Runat="Server">
</asp:Content>

